#include"Dict.hpp"
#include"UdpServer.hpp"
#include<memory>

using namespace std;
int main()
{
    EnableScreen();
    Dict dict("./dict.txt");
    func_t translate = std::bind(&Dict::Translate, &dict, std::placeholders::_1);
    // string ip = "0";//一般设为0，bind了任意IP，只要端口是这个就都能接收到
    uint16_t port = glocalport;
    unique_ptr<UdpServer> usvr = make_unique<UdpServer>(translate,port);
    usvr->InitServer();
    usvr->Start();
    return 0;
}